# -*- coding:utf-8 -*-
import web, models
from baseHandler import BaseHandler
from utils.decorator import render

class DeleteContact(BaseHandler):
    @render(None, 'json')
    def POST(self, contactId):
        self.admin_requried()
        models.Contact.deleteById(contactId)
        raise web.seeother('/contacts')

